import AsyncButton from "@renderer/components/AsyncButton";
import { listenStreamPromise } from "@renderer/utils/ipcUtils";
import { Button, Card, message, Modal } from "antd";
import { useNavigate } from "react-router";



const Home = () => {

    const navigation = useNavigate();

    const testStream = async () => {
        console.log("testStream");
        const result = await window.nodeApi.run_yarn_stream("", "")
        console.log("result", result)

        const msgList = await listenStreamPromise(result);
        console.log(msgList);

        const nodeResult = await window.nodeApi.exec_stream("/scripts/course/yss/getToken.js", "")
        console.log("nodeResult", nodeResult)

        const msgList1 = await listenStreamPromise(nodeResult);
        console.log(msgList1);
    }

    const fileDownload = async () => {
        const result = await window.fileApi.download("https://img1.baidu.com/it/u=461643594,2093034283&fm=253&app=138&f=JPEG?w=500&h=668", "./download/1.png")
        console.log(result);
        message.success("下载完成")
    }

    const requestTest = async () => {
        const result = await window.requestApi.get("https://api.github.com/users/octocat")
        console.log(result);
    }

    const createFloatWindows = async () => {
        try {
            const winURL = process.env.NODE_ENV === 'development' ? `http://localhost:8000/floatingWindow` : `file://${__dirname}/index.html/#/suspension`;

            // 创建一个不带内容的悬浮窗
            const emptyFloatWindow = await window.windowApi.createFloatWindow({
                url: winURL,
                width: 100,
                height: 100
            });


            console.log(emptyFloatWindow);
        } catch (error) {
            console.error(error);
        }

    }

    const testDamaPlatform = async () => {
        // const result1 = await window.damaApi.getCode("iVBORw0KGgoAAAANSUhEUgAAAMgAAABQCAIAAADTD63nAAAs80lEQVR4nOS9B3gU1fc/fGe2pZMCIQlNQpPeq6AUFUQ6IkUQEEVABKQpTekqXUApgjTpvRcJvfeShPSe7b1Pve+z2WVbZndnd4N+f+//8+TJc+eWc8/Mnjlz7rnn3sslRYCTAIErtm5Ys+zH70GFom79t1Puv/S31ezeL1eca+q9zqodE2aO3RwwY6d7fih79jTg5uVRb+jQLus3sq9PmTEAISc0RF8shDQdGhfLjQgDANAEYZYrKTMWGl+ZGx6W9uz7ho2XojyeW/PuM/KurE5mpAwNFDRR5fPROD5APPJz5aNV3c/PZM8/IxAI3aWKo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MZpVRrPaaNaw+QJmP39T/mHqlgtl+UmPHV342ndI0oYWj+3pjBp/Bs2dO/75YZTz5cfPZpWvE9STKnlgad54WiBz7FYU7vFx5nT3gX5YPFhasdWuwjMsdrpb6WiGk3htaLKD2X1cHjtqMgx7g0dPf3wQQ6/O9VSUPmKMNTENrQCugsF/P0Xzjcldd1cveyeXxdlC2MZs28iSFJ4louRaSq7D0ksolbu4y8+88ZtdEh54243rJlcID7mNbHEfP+a0Y9nkn3Lz3L1HSr03WZ3ZCEK49KTHOMygnvXqL3YN9x3k6DeO72De9+bTMB8NiXwpKVRRGqPFfpc44vU2PrHJbr7mjctWfcz3p8qlfuM3xgoLrD882FPRvu7M4TT81+dfTWyGQQgTsrczVvP7QZ/lvnLLWVW3wJ6e28SHpEMIuxhH+dspS+Sf2Y5nCPEsEZZeQsre1PhOfClA6Wx/8IT3Civ+YNh5+jmTe5Y9HtXzsSv9hoeOcduEypb/NUKC6dAG/5iWeTYq2SN9Sp93bq8LrO2pG9W9lFJyLZ5RSorVlEJHFPt9Zp1pWWWWNb9sZ7SnLw39iX0XK3a5j46Xz/b9oc/7yFsg1IkcH+FGfmHqlykVQqfiPw3T1C0qkNqxE7b36eY769nUpw1mIl9KybWkWE2bcQjhPQ/RdkFi2QRWETJvDrL3HXNKtcTu8bTBINyPN8WGe5taPn7l8pz/e+PdJy6menRpbNby23i2l8FDtmO9wMB+D8Snx2PfKCf/GtZmvs2YX/eY+/acgQvWs+a/Bdy2YnH11f+B16Ni8aSC1HCPdG/zj0MPBmixDEybFBR/u6Ys8lT0We6wAAh2um0T1p+WrmZTv3WuixNVtLChNfHtDB9m8n+Ir/YtY1lz0+kP3xwbzQ+dZ1Nt0YGvA6P//wUAAP//DfaGjt1sipIAAAAASUVORK5CYII=")
        // console.log(result1)
    }

    return (
        <Card style={{ width: 300 }}>
            <AsyncButton onClick={async () => {
                const resourcesPath = await window.pathApi.getResourcesPath()
                console.log(resourcesPath);

                const nodeVersion = await window.shellApi.exec("node.exe -v", { cwd: resourcesPath + "/binarys/win/node" });
                console.log(nodeVersion)
                const yarnVersion = await window.shellApi.exec("yarn.cmd -v", { cwd: resourcesPath + "/binarys/win/node" })
                console.log(yarnVersion);
                const electronApi = window.electronApi
                console.log(electronApi);

                const shellResult = await window.shellApi.exec("dir", { cwd: resourcesPath })

                console.log(shellResult);

                const batchExecResult = await window.shellApi.batchExec([
                    "node -v",
                    "yarn -v",
                ], { parallel: false })

                console.log(batchExecResult);

                const execJsResult = await window.shellApi.exec("node.exe ../../../scripts/index.js", { cwd: resourcesPath + "/binarys/win/node" })

                console.log(execJsResult);

                const yarnResult = await window.shellApi.exec(resourcesPath + "/binarys/win/node/yarn.cmd", { cwd: resourcesPath + "/scripts/course/yss" });
                console.log(yarnResult);

                const tokenResult = await window.shellApi.exec("node.exe ../../../scripts/course/yss/getToken.js", { cwd: resourcesPath + "/binarys/win/node" });
                console.log(tokenResult);


            }}>test</AsyncButton >
            <Button onClick={() => {
                Modal.success({
                    title: '提示',
                    content: '这是一个模态框',
                });
            }}>按钮1</Button>
            <Button onClick={() => {
                navigation("/about")
            }}>跳转关于页面</Button>
            <Button onClick={() => {
                navigation("/BaWangChaJi")
            }}>霸王茶几</Button>
            <AsyncButton onClick={() => testStream()}>测试流</AsyncButton>
            <AsyncButton onClick={() => fileDownload()}>下载测试</AsyncButton>
            <AsyncButton onClick={() => requestTest()}>请求测试</AsyncButton>
            <AsyncButton onClick={() => createFloatWindows()}>创建悬浮窗</AsyncButton>
            <AsyncButton onClick={() => testDamaPlatform()}>测试打码平台</AsyncButton>
        </Card>
    );

};
export default Home;
